home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc872.txt < prev    next >
Text File  |  1997-04-01  |  22KB  |  549 lines

  1.  
  2.  
  3.      RFC 872                                            September 1982
  4.                                                                 M82-48
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                TCP-ON-A-LAN
  13.  
  14.  
  15.  
  16.  
  17.      
  18.      
  19.  
  20.      
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                               M.A. PADLIPSKY
  35.                            THE MITRE CORPORATION
  36.                           Bedford, Massachusetts
  37.      
  38.  
  39.  
  40.  
  41.  
  42.                                  Abstract
  43.      
  44.  
  45.      
  46.  
  47.           The sometimes-held position that the DoD Standard
  48.      Transmission Control Protocol (TCP) and Internet Protocol (IP)
  49.      are inappropriate for use "on" a Local Area Network (LAN) is
  50.      shown to be fallacious.  The paper is a companion piece to
  51.      M82-47, M82-49, M82-50, and M82-51.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.                                      i
  94.      
  95.      
  96.      
  97.      
  98.                               "TCP-ON-A-LAN"
  99.  
  100.                               M. A. Padlipsky
  101.  
  102.      Thesis
  103.  
  104.           It is the thesis of this paper that fearing "TCP-on-a-LAN"
  105.      is a Woozle which needs slaying.  To slay the "TCP-on-a-LAN"
  106.      Woozle, we need to know three things:  What's a Woozle?  What's a
  107.      LAN?  What's a TCP?
  108.  
  109.      Woozles
  110.  
  111.           The first is rather straightforward [1]:
  112.  
  113.                One fine winter's day when Piglet was brushing away the
  114.           snow in front of his house, he happened to look up, and
  115.           there was Winnie-the-Pooh.  Pooh was walking round and round
  116.           in a circle, thinking of something else, and when Piglet
  117.           called to him, he just went on walking.
  118.                "Hallo!" said Piglet, "what are you doing?"
  119.                "Hunting," said Pooh.
  120.                "Hunting what?"
  121.                "Tracking something," said Winnie-the-Pooh very
  122.           mysteriously.
  123.                "Tracking what?" said Piglet, coming closer.
  124.                "That's just what I ask myself.  I ask myself, What?"
  125.                "What do you think you'll answer?"
  126.                "I shall have to wait until I catch up with it," said
  127.           Winnie-the-Pooh.  "Now look there."  He pointed to the
  128.           ground in front of him.  "What do you see there?
  129.                "Tracks," said Piglet, "Paw-marks."  he gave a little
  130.           squeak of excitement.  "Oh, Pooh!  Do you think it's a--a--a
  131.           Woozle?"
  132.  
  133.           Well, they convince each other that it is a Woozle, keep
  134.      "tracking," convince each other that it's a herd of Hostile
  135.      Animals, and get duly terrified before Christopher Robin comes
  136.      along and points out that they were following their own tracks
  137.      all the long.
  138.  
  139.           In other words, it is our contention that expressed fears
  140.      about the consequences of using a particular protocol named "TCP"
  141.      in a particular environment called a Local Area Net stem from
  142.      misunderstandings of the protocol and the environment, not from
  143.      the technical facts of the situation.
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.                                      1
  151.      RFC 872                                            September 1982
  152.  
  153.  
  154.      LAN's
  155.  
  156.           The second thing we need to know is somewhat less
  157.      straightforward:  A LAN is, properly speaking [2], a
  158.      communications mechanism (or subnetwork) employing a transmission
  159.      technology suitable for relatively short distances (typically a
  160.      few kilometers) at relatively high bit-per-second rates
  161.      (typically greater than a few hundred kilobits per second) with
  162.      relatively low error rates, which exists primarily to enable
  163.      suitably attached computer systems (or "Hosts") to exchange bits,
  164.      and secondarily, though not necessarily, to allow terminals of
  165.      the teletypewriter and CRT classes to exchange bits with Hosts.
  166.      The Hosts are, at least in principle, heterogeneous; that is,
  167.      they are not merely multiple instances of the same operating
  168.      system.  The Hosts are assumed to communicate by means of layered
  169.      protocols in order to achieve what the ARPANET tradition calls
  170.      "resource sharing" and what the newer ISO tradition calls "Open
  171.      System Interconnection."  Addressing typically can be either
  172.      Host-Host (point-to-point) or "broadcast." (In some environments,
  173.      e.g., Ethernet, interesting advantage can be taken of broadcast
  174.      addressing; in other environments, e.g., LAN's which are
  175.      constituents of ARPA- or ISO-style "internets", broadcast
  176.      addressing is deemed too expensive to implement throughout the
  177.      internet as a whole and so may be ignored in the constituent LAN
  178.      even if available as part of the Host-LAN interface.)
  179.  
  180.           Note that no assumptions are made about the particular
  181.      transmission medium or the particular topology in play.  LAN
  182.      media can be twisted-pair wires, CATV or other coaxial-type
  183.      cables, optical fibers, or whatever.  However, if the medium is a
  184.      processor-to-processor bus it is likely that the system in
  185.      question is going to turn out to "be" a moderately closely
  186.      coupled distributed processor or a somewhat loosely coupled
  187.      multiprocessor rather than a LAN, because the processors are
  188.      unlikely to be using either ARPANET or ISO-style layered
  189.      protocols.  (They'll usually -- either be homogeneous processors
  190.      interpreting only the protocol necessary to use the transmission
  191.      medium, or heterogeneous with one emulating the expectations of
  192.      the other.)  Systems like "PDSC" or "NMIC" (the evolutionarily
  193.      related, bus-oriented, multiple PDP-11 systems in use at the
  194.      Pacific Data Services Center and the National Military
  195.      Intelligence Center, respectively), then, aren't LANs.
  196.  
  197.           LAN topologies can be either "bus," "ring," or "star".  That
  198.      is, a digital PBX can be a LAN, in the sense of furnishing a
  199.      transmission medium/communications subnetwork for Hosts to do
  200.      resource sharing/Open System Interconnection over, though it
  201.      might not present attractive speed or failure mode properties.
  202.      (It might, though.)  Topologically, it would probably be a
  203.      neutron star.
  204.  
  205.  
  206.  
  207.                                      2
  208.      RFC 872                                            September 1982
  209.  
  210.  
  211.           For our purposes, the significant properties of a LAN are
  212.      the high bit transmission capacity and the good error properties.
  213.      Intuitively, a medium with these properties in some sense
  214.      "shouldn't require a heavy-duty protocol designed for long-haul
  215.      nets," according to some.  (We will not address the issue of
  216.      "wasted bandwidth" due to header sizes. [2], pp. 1509f, provides
  217.      ample refutation of that traditional communications notion.)
  218.      However, it must be borne in mind that for our purposes the
  219.      assumption of resource-sharing/OSI type protocols between/among
  220.      the attached Hosts is also extremely significant.  That is, if
  221.      all you're doing is letting some terminals access some different
  222.      Hosts, but the Hosts don't really have any intercomputer
  223.      networking protocols between them, what you have should be viewed
  224.      as a Localized Communications Network (LCN), not a LAN in the
  225.      sense we're talking about here.
  226.  
  227.      TCP
  228.  
  229.           The third thing we have to know can be either
  230.      straightforward or subtle, depending largely on how aware we are
  231.      of the context estabished by ARPANET-style prococols:  For the
  232.      visual-minded, Figure 1 and Figure 2 might be all that need be
  233.      "said."  Their moral is meant to be that in ARPANET-style
  234.      layering, layers aren't monoliths.  For those who need more
  235.      explanation, here goes:  TCP [3] (we'll take IP later) is a
  236.      Host-Host protocol (roughly equivalent to the functionality
  237.      implied by some of ISO Level 5 and all of ISO Level 4).  Its most
  238.      significant property is that it presents reliable logical
  239.      connections to protocols above itself.  (This point will be
  240.      returned to subsequently.)  Its next most significant property is
  241.      that it is designed to operate in a "catenet" (also known as the,
  242.      or an, "internet"); that is, its addressing discipline is such
  243.      that Hosts attached to communications subnets other than the one
  244.      a given Host is attached to (the "proximate net") can be
  245.      communicated with as well as Hosts on the proximate net.  Other
  246.      significant properties are those common to the breed:  Host-Host
  247.      protocols (and Transport protocols) "all" offer mechanisms for
  248.      flow Control, Out-of-Band Signals, Logical Connection management,
  249.      and the like.
  250.  
  251.           Because TCP has a catenet-oriented addressing mechanism
  252.      (that is, it expresses foreign Host addresses as the
  253.      "two-dimensional" entity Foreign Net/Foreign Host because it
  254.      cannot assume that the Foreign Host is attached to the proximate
  255.      net), to be a full Host-Host protocol it needs an adjunct to deal
  256.      with the proximate net.  This adjunct, the Internet Protocol (IP)
  257.      was designed as a separate protocol from TCP, however, in order
  258.      to allow it to play the same role it plays for TCP for other
  259.      Host-Host protocols too.
  260.  
  261.  
  262.  
  263.  
  264.                                      3
  265.      RFC 872                                            September 1982
  266.  
  267.  
  268.           In order to "deal with the proximate net", IP possess the
  269.      following significant properties:  An IP implementation maps from
  270.      a virtualization (or common intermediate representation) of
  271.      generic proximate net qualities (such as precedence, grade of
  272.      service, security labeling) to the closest equivalent on the
  273.      proximate net. It determines whether the "Internet Address" of a
  274.      given transmission is on the proximate net or not; if so, it
  275.      sends it; if not, it sends it to a "Gateway" (where another IP
  276.      module resides).  That is, IP handles internet routing, whereas
  277.      TCP (or some other Host-Host  protocol) handles only internet
  278.      addressing.  Because some proximate nets will accept smaller
  279.      transmissions ("packets") than others, IP, qua protocol, also has
  280.      a discipline for allowing packets to be fragmented while in the
  281.      catenet and reassembled at their destination.  Finally (for our
  282.      purposes), IP offers a mechanism to allow the particular protocol
  283.      it was called by (for a given packet) to be identified so that
  284.      the receiver can demultiplex transmissions based on IP-level
  285.      information only. (This is in accordance with the Principle of
  286.      Layering:  you don't want to have to look at the data IP is
  287.      conveying to find out what to do with it.)
  288.  
  289.           Now that all seems rather complex, even though it omits a
  290.      number of mechanisms.  (For a more complete discussion, see
  291.      Reference [4].)  But it should be just about enough to slay the
  292.      Woozle, especially if just one more protocol's most significant
  293.      property can be snuck in.  An underpublicized member of the
  294.      ARPANET suite of protocols is called UDP--the "User Datagram
  295.      Protocol."  UDP is designed for speed rather than accuracy.  That
  296.      is, it's not "reliable."  All there is to UDP, basically, is a
  297.      mechanism to allow a given packet to be associated with a given
  298.      logical connection. Not a TCP logical connection, mind you, but a
  299.      UDP logical connection.  So if all you want is the ability to
  300.      demultiplex data streams from your Host-Host protocol, you use
  301.      UDP, not TCP.  ("You" is usually supposed to be a Packetized
  302.      Speech protocol, but doesn't have to be.)  (And we'll worry about
  303.      Flow Control some other time.)
  304.  
  305.      TCP-on-a-LAN
  306.  
  307.           So whether you're a Host proximate to a LAN or not, and even
  308.      whether your TCP/IP is "inboard" or "outboard" of you, if you're
  309.      talking to a Host somewhere out there on the catenet, you use IP;
  310.      and if you're exercising some process-level/applications protocol
  311.      (roughly equivalent to some of some versions of ISO L5 and all of
  312.      L6 and L7) that expects TCP/IP as its Host-Host protocol (because
  313.      it "wants" reliable, flow controlled, ordered delivery [whoops,
  314.      forgot that "ordered" property earlier--but it doesn't matter all
  315.      that much for present purposes] over logical connections which
  316.      allow it to be
  317.  
  318.  
  319.  
  320.  
  321.                                      4
  322.      RFC 872                                            September 1982
  323.  
  324.  
  325.      addressed via a Well-Known Socket), you use TCP "above" IP
  326.      regardless of whether the other Host is on your proximate net or
  327.      not.  But if your application doesn't require the properties of
  328.      TCP (say for Packetized Speech), don't use it--regardless of
  329.      where or what you are.  And if you want to make the decision
  330.      about whether you're talking to a proximate Host explicitly and
  331.      not even go through IP, you can even arrange to do that (though
  332.      it might make for messy implementation under some circumstances).
  333.      That is, if you want to take advantage of the properties of your
  334.      LAN "in the raw" and have or don't need appropriate applications
  335.      protocols, the Reference Model to which TCP/IP were designed
  336.      won't stop you.  See Figure 2 if you're visual.  A word of
  337.      caution, though:  those applications probably will need protocols
  338.      of some sort--and they'll probably need some sort of Host-Host
  339.      protocol under them, so unless you relish maintaining "parallel"
  340.      suites of protocols....  that is, you really would be better off
  341.      with TCP most of the time locally anyway, because you've got to
  342.      have it to talk to the catenet and it's a nuisance to have
  343.      "something else" to talk over the LAN--when, of course, what
  344.      you're talking requires a Host-Host protocol.
  345.  
  346.           We'll touch on "performance" issues in a bit more detail
  347.      later. At this level, though, one point really does need to be
  348.      made:  On the "reliability" front, many (including the author) at
  349.      first blush take the TCP checksum to be "overkill" for use on a
  350.      LAN, which does, after all, typically present extremely good
  351.      error properties. Interestingly enough, however, metering of TCP
  352.      implementations on several Host types in the research community
  353.      shows that the processing time expended on the TCP checksum is
  354.      only around 12% of the per-transmission processing time anyway.
  355.      So, again, it's not clear that it's worthwhile to bother with an
  356.      alternate Host-Host protocol for local use (if, that is, you need
  357.      the rest of the properties of TCP other than "reliability"--and,
  358.      of course, always assuming you've got a LAN, not an LCN, as
  359.      distinguished earlier.)
  360.  
  361.           Take that, Woozle!
  362.  
  363.      Other Significant Properties
  364.  
  365.           Oh, by the way, one or two other properties of TCP/IP really
  366.      do bear mention:
  367.  
  368.           1.   Protocol interpreters for TCP/IP exist for a dozen or
  369.                two different operating systems.
  370.  
  371.           2.   TCP/IP work, and have been working (though in less
  372.                refined versions) for several years.
  373.  
  374.  
  375.  
  376.  
  377.  
  378.                                      5
  379.      RFC 872                                            September 1982
  380.  
  381.  
  382.           3.   IP levies no constraints on the interface protocol
  383.                presented by the proximate net (though some protocols
  384.                at that level are more wasteful than others).
  385.  
  386.           4.   IP levies no constraints on its users; in particular,
  387.                any proximate net that offers alternate routing can be
  388.                taken advantage of (unlike X.25, which appears to
  389.                preclude alternate routing).
  390.  
  391.           5.   IP-bearing Gateways both exist and present and exploit
  392.                properties 3 and 4.
  393.  
  394.           6.   TCP/IP are Department of Defense Standards.
  395.  
  396.           7.   Process (or application) protocols compatible with
  397.                TCP/IP for Virtual Terminal and File Transfer
  398.                (including "electronic mail") exist and have been
  399.                implemented on numerous operating systems.
  400.  
  401.           8.   "Vendor-style" specifications of TCP/IP are being
  402.                prepared under the aegis of the DoD Protocol Standards
  403.                Technical Panel, for those who find the
  404.                research-community-provided specs not to their liking.
  405.  
  406.           9.   The research community has recently reported speeds in
  407.                excess of 300 kb/s on an 800 kb/s subnet, 1.2 Mb/s on a
  408.                3 Mb/s subnet, and 9.2 kbs on a 9.6 kb/s phone
  409.                line--all using TCP.  (We don't know of any numbers for
  410.                alternative protocol suites, but it's unlikely they'd
  411.                be appreciably better if they confer like
  412.                functionality--and they may well be worse if they
  413.                represent implementations which haven't been around
  414.                enough to have been iterated a time or three.)
  415.  
  416.           With the partial exception of property 8, no other
  417.      resource-sharing protocol suite can make those claims.
  418.  
  419.           Note particularly well that none of the above should be
  420.      construed as eliminating the need for extremely careful
  421.      measurement of TCP/IP performance in/on a LAN.  (You do, after
  422.      all, want to know their limitations, to guide you in when to
  423.      bother ringing in "local" alternatives--but be very careful:  1.
  424.      they're hard to measure commensurately with alternative
  425.      protocols; and 2.  most conventional Hosts can't take [or give]
  426.      as many bits per second as you might imagine.)  It merely
  427.      dramatically refocuses the motivation for doing such measurement.
  428.      (And levies a constraint or two on how you outboard, if you're
  429.      outboarding.)
  430.  
  431.  
  432.  
  433.  
  434.  
  435.                                      6
  436.      RFC 872                                            September 1982
  437.  
  438.  
  439.      Other Contextual Data
  440.  
  441.           Our case could really rest here, but some amplification of
  442.      the aside above about Host capacities is warranted, if only to
  443.      suggest that some quantification is available to supplement the a
  444.      priori argument:  Consider the previously mentioned PDSC.  Its
  445.      local terminals operate in a screen-at-a-time mode, each
  446.      screen-load comprising some 16 kb.  How many screens can one of
  447.      its Hosts handle in a given second?  Well, we're told that each
  448.      disk fetch requires 17 ms average latency, and each context
  449.      switch costs around 2 ms, so allowing 1 ms for transmission of
  450.      the data from the disk and to the "net" (it makes the arithmetic
  451.      easy), that would add up to 20 ms "processing" time per screen,
  452.      even if no processing were done to the disk image.  Thus, even if
  453.      the Host were doing nothing else, and  even if the native disk
  454.      I/O software were optimized to do 16 kb reads, it could only
  455.      present 50 screens to its communications mechanism
  456.      (processor-processor bus) per second.  That's 800 kb/s. And
  457.      that's well within the range of TCP-achievable rates (cf.  Other
  458.      Significant Property 9).  So in a realistic sample environment,
  459.      it would certainly seem that typical Hosts can't necessarily
  460.      present so many bits as to overtax the protocols anyway.  (The
  461.      analysis of how many bits typical Hosts can accept is more
  462.      difficult because it depends more heavily on system internals.
  463.      However, the point is nearly moot in that even in the intuitively
  464.      unlikely event that receiving were appreciably faster in
  465.      principle [unlikely because of typical operating system
  466.      constraints on address space sizes, the need to do input to a
  467.      single address space, and the need to share buffers in the
  468.      address space among several processes], you can't accept more
  469.      than you can be given.)
  470.  
  471.      Conclusion
  472.  
  473.           The sometimes-expressed fear that using TCP on a local net
  474.      is a bad idea is unfounded.
  475.  
  476.      References
  477.  
  478.      [1]  Milne, A. A., "Winnie-the-Pooh", various publishers.
  479.  
  480.      [2]  The LAN description is based on Clark, D. D.  et al., "An
  481.           Introduction to Local Area Networks,"  IEEE Proc., V. 66, N.
  482.           11, November 1978, pp. 1497-1517, several year's worth of
  483.           conversations with Dr. Clark, and the author's observations
  484.           of both the open literature and the Oral Tradition (which
  485.           were sufficiently well-thought of to have prompted The MITRE
  486.           Corporation/NBS/NSA Local Nets "Brain Picking Panel" to have
  487.  
  488.  
  489.  
  490.  
  491.  
  492.                                      7
  493.      RFC 872                                            September 1982
  494.  
  495.  
  496.           solicited his testimony during the year he was in FACC's
  497.           employ.*)
  498.  
  499.      [3]  The TCP/IP descriptions are based on Postel, J. B.,
  500.           "Internet Protocol Specification," and "Transmission Control
  501.           Specification" in DARPA Internet Program Protocol
  502.           Specifications, USC Information Sciences Institute,
  503.           September, 1981, and on more than 10 years' worth of
  504.           conversations with Dr. Postel, Dr. Clark (now the DARPA
  505.           "Internet Architect") and Dr. Vinton G. Cerf (co-originator
  506.           of TCP), and on numerous discussions with several other
  507.           members of the TCP/IP design team, on having edited the
  508.           referenced documents for the PSTP, and, for that matter, on
  509.           having been one of the developers of the ARPANET "Reference
  510.           Model."
  511.  
  512.      [4]  Padlipsky, M. A., "A Perspective on the ARPANET Reference
  513.           Model", M82-47, The MITRE Corporation, September 1982; also
  514.           available in Proc. INFOCOM '83.
  515.  
  516.      ________________
  517.      *  In all honesty, as far as I know I started the rumor that TCP
  518.         might be overkill for a LAN at that meeting.  At the next TCP
  519.         design meeting, however, they separated IP out from TCP, and
  520.         everything's been alright for about three years now--except
  521.         for getting the rumor killed.  (I'd worry about Woozles
  522.         turning into roosting chickens if it weren't for the facts
  523.         that:  1.  People tend to ignore their local guru; 2.  I was
  524.         trying to encourage the IP separation; and 3.  All I ever
  525.         wanted was some empirical data.)
  526.  
  527.      NOTE:  FIGURE 1. ARM in the Abstract, and FIGURE 2.  ARMS,
  528.         Somewhat Particularized, may be obtained by writing to:  Mike
  529.         Padlipsky, MITRE Corporation, P.O. Box 208, Bedford,
  530.         Massachusetts, 01730, or sending computer mail to
  531.         Padlipsky@USC-ISIA.
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.                                      8